using System;
using System.Collections.Generic;
using System.Text;
namespace BLL.BusinessLayer
{
	[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
	[Serializable]
	public class ClsConfig: BusinessObjectBase
	{

		public ClsConfig() {}

		#region InnerClass
		public enum ClsConfigFields
		{
			ConfigID,
			ConfigName,
			AppID,
			Description,
			ConfigValue
		}
		#endregion

		#region Data Members

			int _configID;
			string _configName;
			int _appID;
			string _description;
			int? _configValue;

		#endregion

		#region Properties

		public int  ConfigID
		{
			 get { return _configID; }
			 set
			 {
				 if (_configID != value)
				 {
					_configID = value;
					 PropertyHasChanged("ConfigID");
				 }
			 }
		}

		public string  ConfigName
		{
			 get { return _configName; }
			 set
			 {
				 if (_configName != value)
				 {
					_configName = value;
					 PropertyHasChanged("ConfigName");
				 }
			 }
		}

		public int  AppID
		{
			 get { return _appID; }
			 set
			 {
				 if (_appID != value)
				 {
					_appID = value;
					 PropertyHasChanged("AppID");
				 }
			 }
		}

		public string  Description
		{
			 get { return _description; }
			 set
			 {
				 if (_description != value)
				 {
					_description = value;
					 PropertyHasChanged("Description");
				 }
			 }
		}

		public int?  ConfigValue
		{
			 get { return _configValue; }
			 set
			 {
				 if (_configValue != value)
				 {
					_configValue = value;
					 PropertyHasChanged("ConfigValue");
				 }
			 }
		}


		#endregion

		#region Validation

		internal override void AddValidationRules()
		{
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("ConfigID", "ConfigID"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("ConfigName", "ConfigName",100));
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("AppID", "AppID"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Description", "Description",1000));
		}

		#endregion

	}
}
